home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 012 / newkey.arc / NEWKEY.DOC next >
Encoding:
Text File  |  1986-10-26  |  41.8 KB  |  1,136 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                               NEWKEY
  15.  
  16.                      A Keyboard Enhancer for
  17.                     The IBM Personal Computer
  18.  
  19.                            Version 1.1
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                  (C)Copyright Frank A. Bell, 1984
  26.                        All rights reserved.
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. Frank A. Bell
  45. 20950 Smallwood
  46. Birmingham, MI 48010
  47. .pa
  48. TABLE OF CONTENTS
  49.  
  50.     INTRODUCTION ............................................. 1
  51.     GETTING STARTED........................................... 2
  52.       LOADING NEWKEY.......................................... 2
  53.         Newkey Parameters..................................... 2
  54.       DEFINING A KEY.......................................... 3
  55.         Space Considerations.................................. 3
  56.         Backspace Handling.................................... 4
  57.     SPECIAL KEY DEFINITION FEATURES........................... 4
  58.       NESTED KEY TRANSLATION.................................. 4
  59.         Recursion............................................. 4
  60.       TRANSLATION BYPASS...................................... 5
  61.       VARIABLE LENGTH FILL-IN-THE-BLANKS...................... 5
  62.       FIXED LENGTH FILL-IN-THE-BLANKS......................... 6
  63.     SPECIAL FEATURES.......................................... 7
  64.       SWITCHING NEWKEY OFF/ON................................. 7
  65.       TRANSLATION BYPASS...................................... 7
  66.     NEWKEY1 OVERVIEW.......................................... 8
  67.       INVOKING NEWKEY1........................................ 8
  68.     NEWKEY1 FUNCTIONS......................................... 8
  69.       DISPLAY DIRECTORY (/d).................................. 8
  70.       DISPLAY TRANSLATION OF KEY (/k)......................... 8
  71.       SAVE FILE (filename.ext/s).............................. 8
  72.       LOAD FILE (filename.ext/l).............................. 9
  73.         Special note to DOS 2.0 users......................... 9
  74.       MERGE FILE (filename.ext/m or filename.ext/m/o).........10
  75.       CLEAR CURRENT KEY DEFINITIONS (/c)......................10
  76.       SWITCH STATUS (/t)......................................10
  77.       UNLOAD AND RECLAIM MEMORY (DOS 1.1 only) (/u)...........10
  78.     MODIFYING NEWKEY..........................................11
  79.       MODIFICATIONS...........................................11
  80.       FIELDS WHICH MAY BE MODIFIED............................12
  81.     DESCRIPTION OF KEY TRANSLATION DISPLAY....................13
  82.     SAMPLE KEY DEFINITION FILES...............................14
  83.       ASM.KEY.................................................14
  84.       DVORAK.KEY..............................................14
  85.       TEST.KEY................................................14
  86.       WS.KEY..................................................15
  87.       GENERAL DOS KEYS COMMON TO MOST SAMPLE FILES............16
  88.     INFORMATION ABOUT THE FILES ON THE NEWKEY DISK............16 
  89.     NEWKEY OVERVIEW...........................................17
  90.       NEWKEY REQUIREMENTS.....................................17
  91.       HOW DOES NEWKEY WORK?...................................17
  92.       NEWKEY'S LIMITATIONS....................................17
  93.     TIPS ON USING NEWKEY......................................18
  94.       USE YOUR AUTOEXEC.BAT FILE..............................18
  95.       SETTING THE DYNAMIC DEFINE AREA SIZE PARAMETER..........18
  96.       DO NOT FORGET TO SAVE YOUR KEY DEFINITIONS..............18
  97.       COMBINING KEY DEFINITION FILES..........................19
  98.       MULTIPLE KEY DEFINITION FILES...........................19
  99.     DISCLAIMER................................................20
  100.     PERMISSION TO COPY........................................20
  101.     THE USER-SUPPORTED CONCEPT................................21 
  102.     PROBLEMS, SUGGESTIONS, ETC................................21 
  103. .pa
  104.                        NEWKEY INTRODUCTION
  105.  
  106. PURPOSE
  107.      
  108.      The Newkey keyboard enhancer simplifies the entry of common 
  109. keystroke sequences by allowing these sequences to be assigned to 
  110. any key desired.  Once assigned to a particular key, whenever that 
  111. key is struck the predefined sequence of keystrokes will be 
  112. returned in place of the struck key.  For example, the alt C key 
  113. might be defined as 'copy' and whenever alt C is struck the string 
  114. 'copy' will be returned. 
  115.  
  116.      Newkey allows customization of software packages, ready 
  117. creation of boiler plate passages, keyboard redefinition and 
  118. other useful purposes.  Several sample key definition files are 
  119. included with Newkey and will be described later. 
  120.  
  121.   Newkey provides many key translation features including:
  122.  
  123.   -  Ability to define any key
  124.  
  125.   -  Variable length "pauses" during key translation
  126.  
  127.   -  Fixed length "pauses" during key translation
  128.  
  129.   -  Nested key translation 
  130.  
  131.   -  Translation bypass for native entry of defined key
  132.  
  133.   -  User defined dynamic define area length
  134.  
  135.  
  136.      Newkey1, the Newkey support program, provides many functions 
  137. including:
  138.  
  139.   -  Saving key definitions on disk
  140.  
  141.   -  Loading key definitions from disk
  142.  
  143.   -  Merging key definitions from disk
  144.  
  145.   -  Directory display of keys with translations
  146.  
  147.   -  Individual display of key translations
  148.  
  149.   -  Newkey on/off switch
  150.  
  151.   -  Clear current key definitions
  152.  
  153.   -  Unload and reclaim memory (DOS 1.1 only)
  154. .pa
  155.                          GETTING STARTED
  156.  
  157.  
  158. LOADING NEWKEY
  159.  
  160. To load newkey type
  161.  
  162.     newkey [/parameters]
  163.  
  164. and press the enter key.  Within a second or two a full screen 
  165. will be displayed with the message;
  166.  
  167.     NEWKEY loaded
  168.  
  169. at the bottom.
  170.  
  171.      When you have received this message Newkey has been loaded.  
  172. At this stage Newkey is ready to use.  You may wish to load a 
  173. predefined set of key translations.  To do this refer to the 
  174. 'Load File' section.
  175.  
  176.  
  177. Newkey Parameters (optional)
  178.  
  179. Function:  Change dynamic define area length.  
  180.  
  181.      Newkey comes with a default dynamic define area length which 
  182. will accept up to 300 characters of new key definitions.  This 
  183. default may be changed at run time by specifying the parameter 
  184. '/xxxxx' when first invoking Newkey.  
  185.  
  186.      'xxxxx' is up to a 5 digit number specifying the number of 
  187. characters which Newkey will reserve for the dynamic define area.  
  188. Newkey will reserve twice this number of bytes in memory (each 
  189. character requires two bytes). 
  190.  
  191.      For example:
  192.  
  193.     newkey /500
  194.  
  195. will reserve enough space for 500 characters of translation (1000 
  196. bytes of storage.)  This parameter is especially valuable to DOS 
  197. 2.0 users as described in the 'LOAD FILE' section in the 'NEWKEY1 
  198. OVERVIEW'.
  199.  
  200.      The legal range for this number is 5 - 13,500. 
  201.  
  202. .pa
  203. DEFINING A KEY
  204.  
  205.      To define a key follow these steps:
  206.  
  207. 1.  Press the alt = key.  
  208.  
  209. This will cause the cursor to take on a  block shape.  As long as 
  210. you are in key definition mode the cursor will retain some sort of 
  211. block shape.
  212.  
  213. 2.  Press the key you wish to define.  
  214.  
  215. Although it will appear to you as if nothing has happened, Newkey 
  216. will assume that this is the key to  be defined.
  217.  
  218. 3.  Now enter the keystrokes you want the key to represent.  
  219.  
  220. The  system will continue to act on these keystrokes as if key 
  221. definition was not  occurring.  This enables you to monitor the 
  222. key definition to ensure that you are actually creating a 
  223. translation that will do what you wish.
  224.  
  225. 4.  When you have finished redefining the key press the alt = 
  226. key again.  
  227.  
  228. The cursor will take on its normal shape and key definition is 
  229. done.  Unless saved in a disk file ('Saving Key Definitions'), the 
  230. new key translation will be lost when the system is rebooted.
  231.  
  232.      For example, to define alt c as 'copy' follow these steps:
  233.  
  234.      1.  Press alt =, the cursor will change to block form.
  235.      2.  Press alt c, the key you wish to define.
  236.      3.  Type in 'copy'.
  237.      4.  Press alt =, the cursor will change back to its normal 
  238.          shape.
  239.  
  240.      Now press alt c and watch 'copy' be returned.
  241.  
  242.      To undefine a key, merely define it without a definition 
  243. (alt =, key, alt =).
  244.  
  245.  
  246. Space Considerations
  247.  
  248.      Newkey comes with enough translation space for 300 characters.
  249. If new key definitions total more than 300 characters in a 
  250. session, Newkey will display this message in reverse video:
  251.  
  252.    *OUT OF MEMORY FOR DYNAMIC DEFINING - PRESS ESC TO CONTINUE*    
  253.  
  254. If you receive this message all further new key definition will be 
  255. halted including the one you are in the middle of doing.  At this 
  256. point the only way to get new key definition space is to save the 
  257. current key definitions and then reload them.  This will 
  258. reinitialize the 300 free spaces for further key definition (DOS 
  259. 1.1 only, DOS 2.0 users will need to increase the size of the 
  260. dynamic define area.  Please refer to the special note in the 
  261. 'LOAD FILE' section in the Newkey1 Overview.)
  262.  
  263.      Should you wish to have more than 300 free spaces at the 
  264. beginning of the session refer to the parameters section in 
  265. 'LOADING NEWKEY'.  
  266.  
  267. Backspace handling
  268.  
  269.      During key definition, Newkey treats the back cursor key as a 
  270. back space and delete.  This allows you to make correct a mistake 
  271. during key definition without the correction becoming part of the 
  272. key definition.  
  273.    
  274.  
  275.                  SPECIAL KEY DEFINITION FEATURES
  276.  
  277.      Many of these features are illustrated in the key definition 
  278. file, TEST.KEY described later.
  279.  
  280.  
  281. NESTED KEY TRANSLATION 
  282.      
  283.      Newkey will translate keys within key definitions down to 8 
  284. levels.  For example, assume the following keys have been 
  285. defined as follows:
  286.  
  287.        alt 1 = level 1 alt 2
  288.        alt 2 = level 2 alt 3
  289.        alt 3 = level 3 alt 4
  290.        alt 4 = level 4 alt 5
  291.        alt 5 = level 5 alt 6
  292.        alt 6 = level 6 alt 7 
  293.        alt 7 = level 7 alt 8
  294.        alt 8 = level 8 alt 9
  295.        alt 9 = level 9 alt 0
  296.  
  297. When alt 1 is pressed, Newkey will check each character returned 
  298. ('L', 'e', 'v', 'e ', 'l',' ','1','alt 2') to see if they too have 
  299. been defined and if so, will return their translation.  Newkey 
  300. will find that alt 2 has been defined and will check its 
  301. definition for further translation to a depth of 8 levels.  At the 
  302. eighth level Newkey stops checking and returns that translation 
  303. without further checking.  So in this case, Newkey will return 
  304. 'level 1level 2level 3level 4level 5level 6level 7level 8alt 9'.  
  305. Translation continues to the eight level before it stops.
  306.  
  307. Recursion
  308.  
  309.      If at any time newkey detects a recursive loop which would 
  310. result in an infinite translation loop (a=b, b=c, c=a for example) 
  311. it will display the following message in reverse video:
  312.  
  313.   RECURSION DETECTED - TRANSLATION ENDED - PRESS ESC TO CONTINUE
  314.  
  315. Press the ESC key to continue.  The key at which recursion was 
  316. detected will be returned untranslated.
  317.  
  318.  
  319. TRANSLATION BYPASS
  320.  
  321.      Newkey provides the ability to prevent further translation 
  322. within a key definition.  If you have a character you wish to be 
  323. returned without any further translation follow these steps:
  324.  
  325.      1.  Before entering the key, press ctrl 2.
  326.      2.  Press the key you wish to always be returned.
  327.  
  328. When Newkey encounters this key at this spot within the key 
  329. definition it will return it without further translation even if 
  330. the key is defined in the key definition file.  For example, 
  331. suppose you wished to define a key to be 'ctrl k ctrl d' but 
  332. ctrl k was already defined as 'ctrl k ctrl q'.  Follow these 
  333. steps:
  334.  
  335.      1. Press alt = to start key definition.
  336.      2. Press alt k, the key you wish to define.
  337.      3. Press ctrl 2 to signal that the next key is not to be 
  338.      translated.
  339.      4. Press ctrl k, the key you wish to be returned.
  340.      5. Press ctrl d
  341.      6. Press alt = to end key definition.
  342.  
  343. Now when you press alt k, ctrl k, not 'ctrl k ctrl q', plus ctrl d 
  344. will be returned.  The no translate key only affects the next key 
  345. entered.  To prevent translation of subsequent keys it will be 
  346. necessary to press the no translate key before entering each of 
  347. them.
  348.  
  349.      Ctrl 2 may be changed to whatever you desire.  Please refer 
  350. to the section 'Modifying Newkey'.
  351.  
  352.  
  353. VARIABLE LENGTH FILL-IN-THE-BLANKS
  354.  
  355.      Newkey provides you with the ability to define variable 
  356. length fill-in-the-blanks fields within key translations.  When 
  357. one of these is encountered in a key translation, Newkey will stop 
  358. translation and wait for the user to enter any keystrokes he 
  359. wishes.  Newkey will continue to accept keystrokes until the 
  360. return key is pressed when normal translation will continue.  To 
  361. define a variable length fill-in-the-blanks field follow these 
  362. steps:
  363.  
  364.      1.  Press alt -.  The cursor will change from a full block to 
  365. half block with its bottom missing.
  366.  
  367.      2.  Enter whatever keystrokes you wish.
  368.  
  369.      3.  Press alt -.  The cursor will change back to a full block.
  370.  
  371.      For example, suppose you frequently started a letter with 'My 
  372. dear John (Frank, Susan, etc.) it is now time' you might wish to 
  373. define one key to mean 'My dear xxxxxx it is now time.'  To do 
  374. this you would follow these steps: 
  375.  
  376.      1.  Press alt = to start key definition.
  377.      2.  Press alt l, the key you wish to define.
  378.      3.  Type 'My dear '.
  379.      4.  Press alt - to start variable length field definition.
  380.      5.  Type in any name, although it is not necessary to the 
  381.          working of the key definition.
  382.      6.  Press alt - to end variable length field definition.
  383.      7.  Type in ' it is now time'.
  384.      8.  Press alt = to end key definition.
  385.  
  386. Now if you were to press alt l, 'My dear ' would be displayed and 
  387. the system would wait for you to enter a name.  Once you had 
  388. entered a name and pressed the return key the system would 
  389. continue with ' now is the time'.
  390.  
  391.      Alt - and the return key as terminator may be changed to 
  392. whatever you desire.  Please refer to the section 'Modifying 
  393. Newkey'.
  394.  
  395.  
  396. FIXED LENGTH FILL-IN-THE-BLANKS
  397.  
  398.      Newkey provides you with the ability to define fixed length 
  399. fill-in-the-blanks fields within key translations.  When one of 
  400. these is encountered in a key translation, Newkey will stop 
  401. translation and wait for the user to enter a predefined number of 
  402. keystrokes.   Newkey will accept keystrokes until the predefined 
  403. number is reached when normal translation will continue.  To 
  404. define a fixed length fill-in-the-blanks field follow these 
  405. steps:
  406.  
  407.      1.  Press ctrl -.  The cursor will change from a full block to 
  408. half block with its top missing.
  409.  
  410.      2.  Enter whatever keystrokes you wish.
  411.  
  412.      3.  Press ctrl -.  The cursor will change back to a full block.
  413.  
  414.      For example, suppose you frequently started a letter with 
  415. 'Enclosed are the xx (some number) items per your request' you 
  416. might wish to define one key to mean 'Enclosed are the xx items 
  417. per your request.'  To do this you would follow these steps: 
  418.  
  419.      1.  Press alt = to start key definition.
  420.      2.  Press alt l, the key you wish to define.
  421.      3.  Type 'Enclosed are the '.
  422.      4.  Press ctrl - to start fixed length field definition.
  423.      5.  Type in any two digit number. 
  424.      6.  Press ctrl - to end fixed length field definition.
  425.      7.  Type in ' items per your request'.
  426.      8.  Press alt = to end key definition.
  427.  
  428. Now if you were to press alt l, 'Enclosed are the 'would be 
  429. displayed and the system would wait for you to enter any two 
  430. characters.  Once you had entered the second character the system 
  431. would continue with ' items per your request.' 
  432.  
  433.      Ctrl - may be changed to whatever you desire.  Please refer to 
  434. the section 'Modifying Newkey'.
  435.  
  436.  
  437. SPECIAL NEWKEY FEATURES
  438.  
  439. Switching newkey off/on - CTRL 6
  440.  
  441.      Newkey may be deactivated/activated by pressing ctrl 6.  This 
  442. acts as a toggle switching Newkey from one status to another.  
  443. When deactivated Newkey is still resident in memory but it will 
  444. act as if the normal keyboard interrupt is in control.
  445.  
  446. Translation bypass - CTRL 2
  447.  
  448.      Key translation may be bypassed by pressing ctrl 2 followed 
  449. by the key desired.  This is the same procedure used to enter a no 
  450. translate key during key definition.
  451. .pa
  452.                          NEWKEY1 OVERVIEW
  453.  
  454.  
  455.      Newkey1 provides many features to complement Newkey functions.
  456.  
  457.  
  458. INVOKING NEWKEY1
  459.  
  460.      Newkey1 may be invoked in one of two ways:
  461.  
  462.      1.  Type Newkey1, press enter and a menu of options will be 
  463. displayed. 
  464.  
  465.      2.  Type Newkey1 plus a parameter and Newkey1 will perform 
  466. the requested function and return to DOS.  This option is 
  467. particularly useful in a batch file invoked at system 
  468. initialization.
  469.  
  470.  
  471.                         NEWKEY1 FUNCTIONS
  472.  
  473. DISPLAY DIRECTORY (/d)
  474.  
  475.      Select function #1 on the menu screen or else type in 
  476. 'newkey1 /d' and press enter.  Newkey1 will display a directory of 
  477. all keys that have been defined.
  478.  
  479.  
  480. DISPLAY TRANSLATION OF KEY (/k)
  481.  
  482.      Select function #2 on the menu screen or else type in 
  483. 'newkey1 /k' and press enter.  Newkey1 will display a screen 
  484. requesting you to enter the key you wish translated.  If the key 
  485. has been defined to Newkey its translation will be displayed.  
  486. The translation will be one character every five spaces and its 
  487. end will be marked by a string of 'FFFF'.  Each character will be 
  488. described by a string 1 to 4 characters in length.  For more 
  489. information refer to 'Description of key translation display'.
  490.  
  491.  
  492. SAVE FILE (filename.ext/s)
  493.  
  494.      Select function #3 on the menu screen or else type in 
  495. 'newkey1 file.key/s' and press enter.  'file.key' is the name of 
  496. the key definition file in which you wish to save your current key 
  497. definitions.  It may be any legal file name.  If you select 
  498. function #3, another screen will be displayed requesting a file 
  499. name.  This function will save your current key definitions from 
  500. memory in a disk file which may later be reloaded by Newkey1 into 
  501. memory again.
  502.  
  503. .pa
  504. LOAD FILE (filename.ext/l)
  505.  
  506.      Select function #4 on the menu screen or else type in 
  507. 'newkey1 file.key/l' and press enter.  'file.key' is the name of 
  508. the key definition file you wish to load into memory.  If you 
  509. select function #4, another screen will be displayed requesting a 
  510. file name.  This function will load the key definitions from a 
  511. disk file into memory where they can be used by Newkey.  Any 
  512. previous key definitions in memory will be wiped out.
  513.  
  514.    *** SPECIAL NOTE TO DOS 2.0 USERS ***
  515.  
  516.      When I wrote the bulk of Newkey only DOS 1.1 was out and I 
  517. made some basic design decisions designed to use a minimum amount 
  518. of memory.  One of these decisions involved loading the key 
  519. definition file from a program external to the resident portion of 
  520. Newkey and loading it right on top of the resident portion in 
  521. contiguous storage.  Naturally this works fine under DOS 1.1 but 
  522. not DOS 2.0.
  523.  
  524.      DOS 2.0 places a piece of storage after each piece of storage 
  525. made resident.  It uses this to check for storage corruption, 
  526. however it prevents the key definition file from being loaded on 
  527. top of Newkey.  Therefore, under DOS 2.0 the key definition file 
  528. is only loaded if there is enough space in the dynamic define area 
  529. (used for new key definitions) to hold the file's key definitions.
  530.  
  531.      If there is enough space, the key definitions are loaded and 
  532. the remaining space used for the dynamic key definition area.  If 
  533. there is not enough space the message:
  534.  
  535.                        FILE TOO BIG TO LOAD
  536.  
  537. is displayed.
  538.  
  539.      If you receive this message it will be necessary to expand 
  540. the dynamic define area either through the run time parameter 
  541. (refer to parameter section in 'LOADING NEWKEY') or by actually 
  542. modifying the code (refer to 'Modifying Newkey') to a size large 
  543. enough to hold the file's key definitions plus whatever size you 
  544. actually want the dynamic define area to be.
  545.  
  546.      To determine how much space must be reserved for a file's key 
  547. definitions follow this procedure:
  548.  
  549.      1.  Determine the size of the key definition file (use 'dir 
  550.      filename.ext').
  551.      2.  Subtract 760 from this file size.  This result is the 
  552.      number of bytes of key definitions which you need to reserve.
  553.      3.  Divide by 2 to get the number of characters.
  554.      4.  Add to this figure the number of characters you wish to 
  555.      reserve for the dynamic define area.
  556.      5.  Re-boot.
  557.      6.  Invoke the new version of Newkey setting the run time 
  558.      parameter appropriately.
  559.      7.  Load the key definition file.
  560.  
  561.  
  562. MERGE FILE (filename.ext/m or filename.ext/m/o)
  563.  
  564.      This function will merge the key definitions from a disk file 
  565. into memory where they can be used by Newkey.  The previous key 
  566. definitions in memory will be kept.  If the same key is defined 
  567. both in memory and in the merge file, the in-memory definition 
  568. will be retained unless the overwrite option is specified.
  569.  
  570.      To merge, select function #5 on the menu screen or else type 
  571. in 'newkey1 file.key/m' or 'newkey1 file.key/m/o' and press enter.  
  572. 'file.key' is the name of the key definition file you wish to 
  573. merge into memory.  The second form, ending in '/o', will invoke 
  574. the overwrite option.  If you select function #5, another screen 
  575. will be displayed requesting a file name and whether you want to 
  576. use the overwrite option.
  577.  
  578.      The same DOS 2.0 space considerations apply to this function 
  579. as to the load function described in the previous section.
  580.  
  581.  
  582. CLEAR CURRENT KEY DEFINITIONS (/c)
  583.  
  584.      Select function #6 on the menu screen or else type in 
  585. 'newkey1 /c' and press enter.  This function will clear all 
  586. current key definitions from memory.
  587.  
  588.  
  589. SWITCH STATUS (/t)
  590.  
  591.      Select function #7 on the menu screen or else type in 
  592. 'newkey1 /t' and press enter.  This function will switch newkey's 
  593. status from on to off or vice-versa.  When Newkey's status is off, 
  594. Newkey is still resident but permits no normal Newkey functions 
  595. (translation, key definition) to occur.
  596.  
  597.      If invoked through the menu the current status is displayed.  
  598. If invoked directly, Newkey1 will return a message indicating its 
  599. current status after the switch.  This function is equivalent to 
  600. using ctrl 6 to switch Newkey's status.
  601.  
  602.  
  603. UNLOAD AND RECLAIM MEMORY (DOS 1.1 only) (/u)
  604.  
  605.      Select function #8 on the menu screen or else type in 
  606. 'newkey1 /u' and press enter.  This function will unload Newkey 
  607. completely from the system and free up its memory for reuse.  
  608. Caution must be exercised in using this feature.  If another 
  609. program has been permanently loaded after Newkey then its storage 
  610. will also be freed.  This function will only work under DOS 1.1.  
  611. .pa
  612.                          MODIFYING NEWKEY
  613.  
  614.      Almost every key and parameter Newkey uses may be changed.  
  615. The following should provide the information necessary to do this.  
  616. All of these changes are done using Debug.  Follow these steps:
  617.  
  618.   1.  Type in 'copy newkey.exe newkey.alt' and press enter.  This 
  619.   will create an alternate version of newkey.exe.
  620.  
  621.   2.  Type in 'debug newkey.alt' and press enter.  This will 
  622.   invoke debug and load Newkey.alt.
  623.  
  624.   3.  Next enter the modifications as described below.  Note that 
  625.   when changing a keystroke it is necessary to change the scan 
  626.   code as well as the ascii code.
  627.  
  628.   4.  Before modifying Newkey first check that you are actually 
  629.   modifying the correct address by issuing a 'D address' command 
  630.   and checking the dumped data against what you expect to find.
  631.  
  632.   5.  If the dumped data agrees with what you expect to find then 
  633.   issue a 'F address l2 xx xx' where xxxx is the new data to be 
  634.   entered.
  635.  
  636.   6.  Repeat steps 3 and 4 until all desired changes have been 
  637.   made.
  638.  
  639.   7.  Type 'w' and press enter.  This will write the changes to 
  640.   disk.
  641.  
  642.   8.  Type 'q' and press enter.  This will end the debug session.
  643.  
  644.   9.  Type in 'ren newkey.exe newkey.old' and press enter.  This 
  645.   will rename the old version of newkey.
  646.  
  647.   10. Type in 'ren newkey.alt newkey.exe' and press enter.  This 
  648.   will rename the new version of newkey.
  649.  
  650.   11. Load your new version of Newkey and test the changes.  (DOS 
  651.   2.0 users will have to re-boot.)
  652.  
  653.      If problems develop, rename the new version back to 
  654.   newkey.alt, rename the old version back to newkey.exe and reload 
  655.   the old version.  Then use debug to check your changes.
  656.  
  657.  
  658. MODIFICATIONS
  659.  
  660. NOTE: The 8088 stores its data backwards, or in other words in 
  661. reverse order when working with 2 byte fields.  These 
  662. modifications all involve changing 2 byte fields.  Thus, once you 
  663. have decided what you are going to change, enter the last byte 
  664. first and the first byte last.  
  665.  
  666.      For example, suppose that you are going to change the size of 
  667. the dynamic define area from 300 characters to 256 characters.  
  668. First determine the hex equivalent of 256, x'0100', reverse the 
  669. '01' and '00' to get x'0001'.  This is the order in which you 
  670. would enter the change using debug.
  671.  
  672.      To modify the key codes you need to enter both the ascii code 
  673. and the scan code.  The first byte (displayed by debug) is the 
  674. ascii code, the second, the scan code.  These codes are documented 
  675. in the IBM Technical Reference Manual.  The 'current data' fields 
  676. are listed in the order displayed by debug which is backwards due 
  677. to 8088 processing as described above.
  678.  
  679.  
  680. FIELDS WHICH MAY BE MODIFIED
  681.  
  682. Dynamic define area length - changing the amount of dynamic define 
  683. area reserved for new key definitions.  This figure should not 
  684. exceed 13,500 decimal, '346c' hex.  
  685.  
  686.      Address:  30d
  687.      Current data: x'2c01'   Be careful to reverse order
  688.  
  689. Alt = - changing the define key initiator/terminator
  690.  
  691.      Function: To change the key used to begin and end the key 
  692.      definition process.
  693.  
  694.      Address:  38f   
  695.      Current data: x'0083'   Be careful to reverse order
  696.  
  697.  
  698. Alt - - changing the Newkey variable length fill-in-the-blanks key 
  699. initiator
  700.  
  701.      Function:  To change the key used to begin and end the 
  702.      definition of the variable length fill-in-the-blanks fields 
  703.      during key definition.
  704.  
  705.      Address:  387
  706.      Current data: x'0082'  Be careful to reverse order
  707.  
  708. CR - changing the end of the variable fill-in-the-blanks terminator
  709.  
  710.      Function: To change the key used to end a variable length 
  711.      fill-in-the-blanks pause during key translation.
  712.  
  713.      Address:  38d
  714.      Current data: x'0d1c'   Be careful to reverse order
  715.  
  716. Ctrl 6 - changing the Newkey toggle key
  717.  
  718.      Function:  To change the key used to turn Newkey off and on.
  719.  
  720.      Address:  385
  721.      Current data: x'1e07'   Be careful to reverse order
  722.  
  723. Ctrl - - changing the Newkey fixed length fill-in-the-blanks key 
  724. initiator
  725.  
  726.      Function:  To change the key used to begin and end the 
  727.      definition of the fixed length fill-in-the-blanks fields 
  728.      during key definition.
  729.  
  730.      Address:  389
  731.      Current data: x'1f0c'   Be careful to reverse order
  732.  
  733. Ctrl 2 - changing the no translate key indicator
  734.  
  735.      Function:  To change the key used to signal that the next key 
  736.      entered during key definition is not to be translated.
  737.  
  738.      Address: 38b
  739.      Current data: x'0003'   Be careful to reverse order
  740.  
  741.  
  742. DESCRIPTION OF KEY TRANSLATION DISPLAY
  743.  
  744.      The Newkey1 directory and key translation display use four 
  745. character codes to describe characters.  For the most part these 
  746. codes are self explanatory, but if there is any confusion about 
  747. their meaning the following should clarify matters.
  748.  
  749.   ^ - control prefix
  750.   ~ - alt prefix
  751.   \ - capitalization prefix
  752.   F - followed by a number is a function key prefix
  753.  
  754. SPECIAL
  755. CODE - DESCRIPTION
  756.  
  757. CR   - return key (Carraige Return)
  758. FILL - fixed length fill-in-the-blanks spot
  759. NOTR - 'no translate' character, indicates that next character 
  760.        will not be translated.
  761. PAUS - variable fill-in-the-blanks spot
  762. SPAC - space or blank
  763. ^END - control-end
  764. ^HOM - control-home
  765. ^PGD - control-pgdn
  766. ^PGU - control-pgup
  767. ^PSC - control-PrtSc
  768. ^<-- - control-<-- (cursor backwards)
  769. ^--> - control---> (cursor forwards)
  770. UNK  - unknown character, could not translate.  This should not 
  771.        happen.
  772. .pa
  773.                    SAMPLE KEY DEFINITION FILES
  774.  
  775.  
  776.      Several sample key definition files are supplied with Newkey 
  777. to illustrate its use and provide you with a starting point.  
  778. These files are described below.  There are a general set of DOS 
  779. keys common to these files which are described at the end.
  780.  
  781.  
  782. ASM.KEY - Assembler programmer's customization file
  783.  
  784.   KEYS        ACTION
  785.   ----          ------
  786.  
  787.   Alt a       ';****.....****' (line of '*'s)
  788.  
  789.   Alt b       'byte ptr '
  790.  
  791.   Alt o       'offset '
  792.  
  793.   Alt w       'word ptr '
  794.  
  795.  
  796.      I use Wordstar to do my programming so that these commands 
  797. are merged with my Wordstar file.  In addition to these, I use F1 
  798. to set up my assembler environment under Wordstar.  This involves 
  799. mainly setting appropriate tab stops and I have left F1 set up to 
  800. do this.
  801.  
  802.  
  803. DVORAK.KEY - Dvorak keyboard customization
  804.  
  805.      This file contains the key definitions necessary to redefine 
  806. your keyboard to the Dvorak layout.  There is one minor problem 
  807. with using the Dvorak layout with the Caps Lock feature.  Caps 
  808. Lock will only lock the standard alphabet into shift mode.  Since 
  809. the Dvorak layout uses some non-alphabetic keys the Caps Lock 
  810. feature will not automatically capitalize these keys, although 
  811. normal shifting will.
  812.  
  813.      For more information about the Dvorak layout consult the 
  814. article "Using IBM's Marvelous Keyboard" page 402 in the May 1983 
  815. issue of Byte magazine.
  816.  
  817.      The general DOS definitions are not part of this file.
  818.  
  819.  
  820. TEST.KEY - illustrates Newkey features
  821.  
  822.   KEY    ACTION
  823.   ---    ------
  824.  
  825.   F1     Illustrates the fixed length fill-in-the-blanks feature.
  826.  
  827.   F2     Illustrates the variable length fill-in-the-blanks 
  828.          feature.
  829.  
  830.   F3     Illustrates the no translate feature.
  831.  
  832.   Alt 1  Illustrates the nested definitions feature.  Each key 
  833.   thru   returns 'levelx' plus whatever the next higher alt number 
  834.          is defined as. These are defined as described in the 
  835.   Alt 9  'Nested key translation' section earlier in the text.
  836.  
  837.  
  838. WS.KEY - Wordstar customization file
  839.  
  840.      Newkey may be used to customize the Wordstar environment.  F1 
  841. creates a customized initial environment.  Many of the commands 
  842. depend upon making sure that alt f is defined to be the active 
  843. Wordstar file you are using.
  844.  
  845.  
  846.   KEYS        ACTION
  847.   ----        ------
  848.  
  849.   F1          Set help level to 0, toggle off justification, 
  850.               toggle off auto-hypenation
  851.  
  852.   F2          Save file (Ctrl KS), return to original cursor 
  853.               position (Ctrl QP), copy file (defined by alt f) to 
  854.               your a disk (Ctrl KO).  
  855.  
  856.               This will save your current file as defined by alt f 
  857.               and then copy it to your a disk.  This is a one step 
  858.               procedure Wordstar users on a ram disk can use to 
  859.               save their file on a floppy without leaving their 
  860.               current position within Wordstar.
  861.  
  862.   Alt F2      Save file and return to original cursor position.
  863.  
  864.   F5          Underscore
  865.  
  866.   Alt F5      Open underscore, accept input, close underscore 
  867.               after return key is struck.
  868.  
  869.   F6          Double strike
  870.  
  871.   Alt F6      Open double strike, accept input, close double 
  872.               strike after return key is struck.
  873.                                                                               
  874.   Alt F9      Address a short envelope and leave me at position to 
  875.               start receiver's address.
  876.  
  877.   Alt F10     Type my address and end at spot to enter date.
  878.  
  879.   Del         Delete character directly above cursor.
  880.  
  881.   Alt d       Call up Wordstar document file (d, alt f, return)
  882.  
  883.   Alt f       Current file name.  Used by F2, alt d, and alt n.
  884.  
  885.   Alt n       Call up Wordstar non-document file (n, alt f, return)
  886.  
  887.     
  888. GENERAL DOS KEYS COMMON TO MOST KEY FILES:
  889.  
  890.   Alt c       'copy '
  891.  
  892.   Alt e       'erase '
  893.  
  894.   Alt f       Current file name.  Used in other key translations.
  895.  
  896.   Alt t       'dir '
  897.  
  898.  
  899. INFORMATION ABOUT THE FILES ON THE NEWKEY DISK
  900.  
  901. LOADNEW.BAT - This is a sample batch file which will load Newkey 
  902. and the sample Wordstar key definition file, WS.KEY.
  903.  
  904. NEWKEY.DOC - This is the documentation file which contains this 
  905. document.  It is only required when you want to print the 
  906. documentation.
  907.  
  908. NEWKEY.EXE - This is the program whick actually replaces IBM's 
  909. keyboard interrupt (x'16).  This program remains resident while 
  910. other programs execute and unless called upon to translate will be 
  911. transparent.
  912.  
  913. NEWKEY1.EXE - This program provides several functions necessary to 
  914. effectively use Newkey and is described further in this document.
  915.  
  916. PRINTDOC.EXE - This program will print the document file, 
  917. NEWKEY.DOC and is only needed for that purpose.
  918.  
  919.      All files ending in 'KEY' are sample key definition files and 
  920. are described elsewhere in this document.
  921.  
  922. .pa
  923.                               NEWKEY OVERVIEW
  924.  
  925. NEWKEY REQUIREMENTS
  926.  
  927.      Newkey requires PC-DOS 1.1 OR 2.0 and will run on either a 
  928. monochrome or color monitor.  The base program requires 
  929. approximately 3.7K of memory plus an additional 2 bytes per 
  930. character of translation and reserved dynamic define area.
  931.  
  932.  
  933. HOW DOES NEWKEY WORK?
  934.  
  935.      The Newkey keyboard enhancer consists of two programs, 
  936. Newkey.exe and Newkey1.exe.  Newkey.exe, when invoked will replace 
  937. the normal keyboard interrupt (x'16') of DOS.  Just as the normal 
  938. keyboard interrupt, Newkey will read the keyboard buffer and 
  939. return the key to the requesting program, except that Newkey will 
  940. first check the key against its key definition file (where the key 
  941. translations are stored) and if it finds an entry for that key it 
  942. will return the corresponding translation.
  943.  
  944.      Newkey1.exe, the companion program to newkey.exe, provides 
  945. several functions necessary to use Newkey.exe effectively (as 
  946. described in the 'Newkey1 Overview'.  Newkey1 is loaded into high 
  947. memory so that key definition files may be freely loaded.  This 
  948. raises a potential problem should there not be enough free space 
  949. between the top of Newkey and the bottom of Newkey1 to load a key 
  950. definition file.  If this should happen results will be 
  951. unpredictable. 
  952.  
  953.  
  954. NEWKEY'S LIMITATIONS
  955.  
  956.      Newkey allows redefinition of any key (except ctrl break, 
  957. ctrl 6, ctrl 2,and alt =).  Newkey will handle up to approximately 
  958. 27k of key definitions, but any key definition may be as long as 
  959. you wish up to this maximum.  The 27k maximum includes a few bytes 
  960. for overhead and two bytes per character of translation.  Results 
  961. are unpredictable should the 27k maximum be exceeded. 
  962.  
  963. .pa
  964.                             TIPS ON USING NEWKEY
  965.  
  966. USE YOUR AUTOEXEC.BAT FILE
  967.  
  968.      Put the commands to load Newkey and your key definition file 
  969. in your autoexec.bat file.  This will cause Newkey and your key 
  970. definitions to be automatically loaded whenever you boot.  If you 
  971. have disks for different purposes, each disk could contain a copy 
  972. of Newkey, Newkey1 and your key definition files.   
  973.  
  974.      An example of the statements you would want to use can be 
  975. found in LOADNEW.BAT, a batch file supplied with Newkey.  Use your 
  976. editor to copy these statements into your autoexec.bat file and 
  977. change the parameters as appropriate.
  978.  
  979. SETTING THE DYNAMIC DEFINE AREA SIZE PARAMETER
  980.  
  981.      When you first install Newkey you will be actively defining 
  982. keys.  This will require a lot more space in the dynamic define 
  983. area than you will normally use.  During these early sessions set 
  984. the dynamic define area size parameter to a large number, 5000 for 
  985. example.  This will enable you to define key definitions using up 
  986. to 5000 characters without running out of space.
  987.  
  988.      Later, when you have finished creating your key definition 
  989. files, lower the number to a level which will support your normal 
  990. key definition needs during a session.  Newkey uses 300 as a 
  991. default, but you can set the number as low as 5.  Of course you 
  992. may set the define area size at any level you wish, but remember, 
  993. that area is not available to any other programs.
  994.  
  995.      DOS 2.0 users must also allow enough space to load their key 
  996. definitions in addition to supporting their normal key definition 
  997. needs during a session (see Special Note to DOS 2.0 Users in LOAD 
  998. FILE section under NEWKEY1 FUNCTIONS.)
  999.  
  1000.      The dynamic define area size parameter is specified when you 
  1001. load Newkey.  For more information refer to the section Newkey 
  1002. Parameters under LOADING NEWKEY.
  1003.  
  1004. DO NOT FORGET TO SAVE YOUR KEY DEFINITIONS
  1005.  
  1006.      Do not forget to save your key definitions at the end of a 
  1007. session.  Unless you save the keys you have defined during the 
  1008. current session they will be lost when you re-boot or turn off the 
  1009. computer.  
  1010.  
  1011.       It is suggested that as soon as you have finished defining a 
  1012. set of keys you wish to keep, that you save them immediately.  It 
  1013. is very easy to start a session defining new keys, proceed to use 
  1014. them for the rest of the session, and then turn off the computer.  
  1015. If this happens, you will have to redefine each key again.  For 
  1016. information on saving your key definitions refer to the SAVE FILE 
  1017. section under NEWKEY1 FUNCTIONS.
  1018.  
  1019.  
  1020. COMBINING KEY DEFINITION FILES
  1021.  
  1022.       Occasionally you may wish to combine two key definition 
  1023. files.  This may be done by loading one of the files into memory 
  1024. using the LOAD FILE function, merging the second into memory using 
  1025. the MERGE FILE function, and then saving the key definitions using 
  1026. the SAVE FILE function.  These functions are described under 
  1027. NEWKEY1 FUNCTIONS.     
  1028.  
  1029.  
  1030. MULTIPLE KEY DEFINITION FILES
  1031.  
  1032.      You may wish to define multiple key definition files based 
  1033. on function.  This would allow you to easily build different key 
  1034. definition files without redefining each function's keys for each 
  1035. key definition file.  They could also be used to create in-memory 
  1036. key definitions at boot time without combining them all into one 
  1037. key definition file.
  1038.  
  1039.      For example, you could define a file for your word 
  1040. processor, speadsheet, general DOS commands, etc. and then merge 
  1041. various combinations of them together to create one file, or you 
  1042. could merge each file in at boot time.  
  1043.  
  1044. .pa
  1045. DISCLAIMER.
  1046.  
  1047.      In no event will the author be liable to you for any damages, 
  1048. including any lost profits, lost savings or other incidental or 
  1049. consequential damages arising out of the use of or inability to 
  1050. use these programs, even if the author has been advised of the 
  1051. possibility of such damages, or for any claim by any other party.
  1052.  
  1053.  
  1054. PERMISSION TO COPY:
  1055.  
  1056.      Individuals are granted permission by the author to freely 
  1057. copy the Newkey programs and documentation for their own use or to 
  1058. share with others, so long as no price or other consideration is 
  1059. charged.
  1060.  
  1061.      Computer clubs and other non-profit organizations are granted 
  1062. permission by the author to freely copy the Newkey programs and 
  1063. documentation and share it with their members, so long as:
  1064.  
  1065. 1.  No price or other consideration is charged.  However, a 
  1066.     distribution cost may be charged for the cost of the diskette, 
  1067.     so long as it is not more than $10 total.
  1068.  
  1069. 2.  Club members are informed of the user-supported concept and 
  1070.     encouraged to support it with their donations.
  1071.  
  1072. 3.  The programs and documentation are not modified in any way and 
  1073.     are distributed together.
  1074.  
  1075.      Companies are granted permission by the author to copy the 
  1076. Newkey programs and documentation for use on other computers and 
  1077. at other locations in the company, so long as:
  1078.  
  1079. 1.  The full registration fee of $30 has been paid for the 
  1080.     original copy of the program.
  1081.  
  1082. 2.  A usage fee of $25 is paid for each additional "building" 
  1083.     where Newkey will be used.  Within any building for which the 
  1084.     usage fee has been paid, Newkey may be copied freely for use 
  1085.     on any computer in that building.
  1086.  
  1087. .pa
  1088. THE USER-SUPPORTED CONCEPT.
  1089.  
  1090.                      User-supported Software
  1091.   You are encouraged to copy and share this program with others.
  1092.     If after evaluating this program you find it to be useful,
  1093.                 I trust you to send a $30 payment.
  1094.  
  1095.                             Frank Bell
  1096.                          20950 Smallwood
  1097.                        Birmingham, MI 48010
  1098.  
  1099.  
  1100. User-supported software is an experiment in distributing computer 
  1101. programs, based on these beliefs:
  1102.  
  1103. 1.  That the value and utility of software is best assessed by the 
  1104.     user on his/her own system.
  1105.  
  1106. 2.  That the creation of personal computer software can and should 
  1107.     be supported by the computing community.
  1108.  
  1109. 3.  That copying of programs should be encouraged, rather than 
  1110.     restricted.
  1111.  
  1112.      Anyone may legally obtain an evaluation copy of the program 
  1113. from a friend or computer club.  After you have had a chance to 
  1114. use and evaluate the program in your own environment, you are 
  1115. trusted to either forward a payment to the author, or to 
  1116. discontinue use of the program.  In any case, you are encouraged 
  1117. to copy the program for evaluation by others.
  1118.  
  1119.      Free distribution of software and voluntary payment for its 
  1120. use eliminates costs for advertising and copy protection schemes.  
  1121. Users obtain quality software at greatly reduced cost.  They can 
  1122. try it out before buying, and do so at their own pace and in the 
  1123. comfort of their own home or office.  The best programs will 
  1124. survive, based purely on their quality and usefulness.
  1125.  
  1126.      Please join the experiment.
  1127.  
  1128.      If you believe in these ideals, your contribution is 
  1129. solicited to help make them work.
  1130.  
  1131.  
  1132. PROBLEMS, SUGGESTIONS, ETC. 
  1133.  
  1134.      If you should have any problems, suggestions or questions 
  1135. please feel free to write me at the above address.
  1136. hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh